using System.Linq;
using System.Web.UI;
using OpenWaves.Web;

namespace OpenWaves.ActivityFeed.Web.Controls
{
    public class UpdatesPlaceHolder : ListPlaceHolderBase
    {
        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);

            var activityFeed = this.ParentActivityFeedBase;
            if (activityFeed.UpdateTemplate != null)
            {
                WriteAttributes(writer, "updates", activityFeed.UpdatesSettings, activityFeed.UpdateTemplate.ClientID);
            }
        }
    }
}